package com.yzf.smsforward.utils;

import android.content.Context;
import android.text.TextUtils;

import com.yzf.smsforward.Constants;

/**
 * 项目名称：FoldingVerifyCode
 * 类描述：IP工具类
 * 创建人：Administrator
 * 创建时间：2019年10月1日
 */
public class IPUtils {
    private static String[] platforms = {
            "http://pv.sohu.com/cityjson",
            "http://pv.sohu.com/cityjson?ie=utf-8",
            "http://ip.chinaz.com/getip.aspx"
    };

    private static IPUtils instance = null;

    private IPUtils() {
    }

    public static IPUtils getInstance() {
        if (instance == null) {
            instance = new IPUtils();
        }
        return instance;
    }


    public static String outNetIp = "";

    public static String getOutNetIP(Context context) {
        String url = Utils.getValueFromSP(context, Constants.HTTPS_URL, Constants.HTTPS_URL_KEY);
        if (!TextUtils.isEmpty(url)) {
            url = url + Constants.HTTPS_IF;
        }
        return url;
    }
}
